package com.wwtech.epp.ui.activity.mine.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.mine.ReSetPasswordActivity;
import com.wwtech.epp.ui.activity.mine.contract.ReSetPasswordContract;
import com.wwtech.epp.ui.activity.mine.presenter.ReSetPasswordPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.mine
 * @Description: The moduele of ReSetPasswordActivity, provide field for ReSetPasswordActivity
 * @date 2017/09/05 14:27:50
 */
@Module
public class ReSetPasswordModule {
    private final ReSetPasswordContract.View mView;


    public ReSetPasswordModule(ReSetPasswordContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public ReSetPasswordPresenter provideReSetPasswordPresenter(HttpAPIWrapper httpAPIWrapper, ReSetPasswordActivity mActivity) {
        return new ReSetPasswordPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public ReSetPasswordActivity provideReSetPasswordActivity() {
        return (ReSetPasswordActivity) mView;
    }
}